<template>
  <view>
    <view class="lz-status_bar">
      <view class="lz-top_view"></view>
    </view>
    <view class="index-head">
      <view class="index-head-top">
        <view class="index-head-l"
              @tap="$navigateBack">
          <view class="iconfont icon-zuojiantou"></view>
        </view>
        <view class="index-head-m">消息详情</view>
      </view>
    </view>
    <view class="index-tiku notice-detail">
      <view class="notice-detail-title">{{message_detail.notice_title}}</view>
      <view class="notice-detail-time">
        <view class="notice-detail-blue">{{message_detail.author}}</view>
        <view class="pub-gray">发布时间:{{message_detail.create_time}}</view>
      </view>
      <view class="notice-detail-content">
        <uParse :content="message_detail.content"/>
      </view>
    </view>
  </view>
</template>
<script>
import uParse from '@/components/uParse/src/wxParse.vue'
export default {
  data () {
    return {
      message_detail: {
        // notice_title: '阿萨大大',
        // create_time: 1,
        // id: 1,
        // content: '啊实打实的'
      },

      pages_params: {}
    }
  },
  onLoad (opts) {
    this.pages_params = opts
    // console.log(this.pages_params)
    this.get_xiaoxi_detail()
  },
  onShow () { },
  mounted () { },
  computed: {},
  components: {
    uParse
  },
  methods: {
    async get_xiaoxi_detail () {
      let res = await this.$myHttp.post({
        url: this.$myHttp.urlMap.messageDetail,
        data: {
          id: this.pages_params.id
        }
      })
      if (res.code === 1) {
        res.data.create_time = this.$myUtils.$common.formatDate(
            res.data.create_time * 1000,
            "Y年M月D日 h:m:s"
          );
        this.message_detail = res.data
      }
    }
  }
}
</script>
<style>
page {
  background: #fff;
}
/*消息详情*/
.notice-detail  {
  width: 92%;
  margin: 12px auto;
  font-size: 16px;
  background: #fff;
}
.notice-detail-title {
  font-size: 18px;
  font-weight: bold;
}
.notice-detail-time {
  display: flex;
  font-size: 14px;
  align-items: center;
  margin: 10px 0 9px;
}
.notice-detail-blue {
  color: #000;
  font-weight: bold;
  margin-right: 10px;
  font-size: 15px;
}
.notice-detail-content {
  line-height: 23px;
}
</style>
